From: Daniel Friesen Date: Wed, 27 Aug 2008 14:47:41 +0000 (+0000) Subject: Fix a minor regression pointed out by aaron. X-Git-Tag: 1.31.0-rc.0~45624 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=08c7c17b576fc6da867c59bfd0abe2c7ecbd74be;p=lhc%2Fweb%2Fwiklou.git Fix a minor regression pointed out by aaron. The spacer for between the preview area and the edit toolbar was being outputted even when not previewing. --- diff --git a/includes/EditPage.php b/includes/EditPage.php index c5910c3d58..25c3d4c30a 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1290,9 +1290,7 @@ class EditPage { $wgOut->addHTML( $this->editFormPageTop ); if ( $wgUser->getOption( 'previewontop' ) ) { - $this->displayPreviewArea( $previewOutput ); - // Spacer for the edit toolbar - $wgOut->addHTML( '


' ); + $this->displayPreviewArea( $previewOutput, true ); } @@ -1462,7 +1460,7 @@ END $wgOut->addHTML( $this->editFormTextBottom ); $wgOut->addHTML( "\n" ); if ( !$wgUser->getOption( 'previewontop' ) ) { - $this->displayPreviewArea( $previewOutput ); + $this->displayPreviewArea( $previewOutput, false ); } wfProfileOut( $fname ); @@ -1515,10 +1513,12 @@ END $attribs ) ); } - protected function displayPreviewArea( $previewOutput ) { + protected function displayPreviewArea( $previewOutput, $isOnTop = false ) { global $wgOut; if ( $this->formtype == 'preview') { $this->showPreview( $previewOutput ); + // Spacer for the edit toolbar + $wgOut->addHTML( '


' ); } else { $wgOut->addHTML( '
' ); }